<template>
	<view class="content">
		<view>
			<text>大家好，我叫Kimi，我没有性别，出生于2024-01-01，毕业于清华大学计算机系。目前</text>
		</view>
		<view>
			<text>结果：{{scanResult}}</text>
		</view>
		<button @click="scan">扫码</button>
	</view>
</template>


<script>
	// import { ref } from 'vue'
	import { scanCode } from '@/uni_modules/lime-scan';
	
	export default {
		data() {
			return {
				scanResult: ''
			}
		},
		methods: {
			scan(){
				scanCode({
					success:(res) => {
						const result = res.result
						this.scanResult = result
						// uni.showToast({
						// 	title: result
						// })
					},
					fail: (err) =>{
						this.scanResult = '扫码失败'
						console.log('err', err)
					}
				})
			}
		}
	}
	
</script>

<style>

</style>